; Grange Murder source, copyright (C) 1987 Level 9 Computing.
;
; TABLE.TXT, assembler format data for tables, a.k.a lists/arrays. 
; (Save the assembled data as TABLE.DAT). 
;
; You must start all DEFWs on EVEN boundaries, else subsequent code 
; seems to be padded to make it even (according to the GENST listing, 
; anyway). The EVEN directive inserts a padding byte if appropriate.
;
 ORG 0
starttables
 dc.l LIST1-starttables ; MOVEABLE OBJECT START
 dc.l $8400 ; OBJECT CURRENT
 dc.l $8400+MaxObject ; HI OBJECT CURRENT
 dc.l LIST4-starttables ; scenery table
 dc.l NPCINITIAL-starttables ; npc initial and 'floor pointers'
 dc.l $8400+LIST23SIZE ; 6 - NPC current attributes, stack
 dc.l $8400+LIST236SIZE ; 7 - output buffer,scoretable
 dc.l list8-starttables ; 8 - assorted fixed system tables
 dc.l $8400+LIST2367SIZE ; 9 - input table,object table
 dc.l ENDTABLE-starttables
;---
; CONTAINER POSITONS
ON EQU 1
UNDER EQU 2
BEHIND EQU 3
CARRIED EQU 4
WORN EQU 5
PREPIN EQU 7
HANGINGFROM EQU 8 ; E.G. TREE
pushedby equ 11
LIEON EQU 12
SITON EQU 13
fastenedto equ 14
lyingon equ 15
;
; additions to high initial position
OBV EQU $80
ita equ 0
itan equ $10 ; starts with a vowel
singularsome equ $20 ; "some cheese is tasy"
he equ $30
she equ $40
pluralsome equ $50 ; "some ropes are strong"
you equ $60
properMale equ $70
ProperFemale equ $70
; ProperFemale is handled by SpecialConjugate
;
MaxObject EQU 189 ; should be two bigger than it really needs to be
NUMHIOBJ EQU MaxObject ; NO. OF OBJECTS WITH A HIGH POSITION
minnpc equ 1
maxnpc equ 64
npctablesize EQU (MaxNpc+1)*8
npcstacksize equ 260 ; 300

OUTPUTBUFFER EQU 32
SCORETABLE EQU 44 ;length of score table
OBJTABLE EQU 16 ; number of objects which can be specified on one line
;
;
LIST23SIZE EQU MaxObject+NUMHIOBJ
LIST236SIZE EQU LIST23SIZE+npctablesize+npcstacksize
LIST2367SIZE EQU LIST236SIZE+OUTPUTBUFFER+SCORETABLE+179+maxnpc+10
; 179 is num rooms
;;LIST23678SIZE equ LIST2367SIZE ; >>Mike 8/8/87 - reduced from ST version
;>>mike 8/8/87 LIST23678SIZE EQU LIST2367SIZE+OBJTABLE
;
;---
LIST1
; examples...
;nabon equ 37
; dc.b ProperMale,14	; 37
;Beggar equ 38
; dc.b he,223		; 38
;army equ 40
; dc.b itan,61		; 40
;mermaid equ 43
; dc.b she,234	; 43 


 dc.b 0,0               ; OBJECT 0
USER EQU 1
 dc.b 0+you,8          ;  1 - USER (detective)
William equ 2
 dc.b 0+ProperMale,0 ; 3	; 2 - William
Joan equ 3
 dc.b 0+ProperFemale,0 ; 7	; 3 - Joan
Anthony equ 4
 dc.b 0+ProperMale,8	; 4 - Anthony
Fiona equ 5
 dc.b 0+ProperFemale,5	; 5 - Fiona
 dc.b 0,0		; 6
 dc.b 0,0		; 7
 dc.b 0,0		; 8
 dc.b 0,0		; 9
 dc.b 0,0		; 10
 dc.b 0,0		; 11
 dc.b 0,0		; 12
 dc.b 0,0		; 13
 dc.b 0,0		; 14
 dc.b 0,0		; 15


 dc.b 0,0		; 16
 dc.b 0,0		; 17
 dc.b 0,0		; 18
 dc.b 0,0		; 19
Whiteplate equ 20
 dc.b 0,8		; 20 plate
 dc.b 0,0 ; 8		; 21 plate
 dc.b 0,0		; 22
 dc.b 0,0		; 23
 dc.b 0,0		; 24
 dc.b 0,0		; 25

 dc.b 0,0		; 
 dc.b 0,0		; 
 dc.b 0,0		; 
 dc.b 0,0		; 
 dc.b 0,0		; 
 dc.b 0,0		; 
 dc.b 0,0		; 
 dc.b 0,0		; 
 dc.b 0,0		; 
 dc.b 0,0		; 

 dc.b 0,0		; 
 dc.b 0,0		; 
 dc.b 0,0		; 
 dc.b 0,0		; 
 dc.b 0,0		; 
 dc.b 0,0		; 
 dc.b 0,0		; 
 dc.b 0,0		; 
 dc.b 0,0		; 
 dc.b 0,0		; 

 dc.b 0,0		; 
 dc.b 0,0		; 
 dc.b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


;-------------------------
;
;; Brief location objects (479+N). See 779+ for examine messages and 
;; 1199+ for their verbose equivalents..
; dc.b 0,241		; 180 
; dc.b 0,244		; 181 
; dc.b 0,236		; 182 
; dc.b 0,222		; 183 
; dc.b 0,226		; 184 
; dc.b 0,227		; 185 
; dc.b 0,223		; 186 
; dc.b 0,221		; 187 

; 
;


;---
 even
ENDOBJECTS
;terraintable
list8
; table for remarks made by 'PET' - Damosel Maledisant (Galahad in L3)...
 dc.b 6,0 ; tried soup
; ?,1
 dc.b 26,3 ; bet you drop it!
 dc.b 28,4 ; told you so
 dc.b 29,5 ; "no key"
 dc.b 70,6 ; walk on water
 dc.b 82,7 ; that was very careless
 dc.b 100,8 ; no where near good enough to help elaine
 dc.b 102,9 ; weakling
 dc.b 149,9 ; weakling
 dc.b 103,10 ; now you've done it
 dc.b 105,11 ; you horny little devil
 dc.b 111,12 ; watch it - she's only after your title
 dc.b 122,13 ; I hope you enjoyed that
 dc.b 140,14 ; don't wake nabon!
 dc.b 147,15 ; cowardly
 dc.b 160,16 ; need hedge trimmer?
 dc.b 185,17 ; can't refuse a challenge
 dc.b 188,18 ; he wasn't a worthy opponent
 dc.b 191,19 ; should have seen that coming
 dc.b 201,20 ; that should have been you, L
; dc.b 216,21 ; cocked that up!
 dc.b 234,22 ; cowardly trick!
 dc.b 243,23 ; didn't you rescue the hawk?
 dc.b 245,24 ; not worthy to wear armour anyway
 dc.b 255,250 ; add on 250 to numbers...

 dc.b 12,25 ; ha ha!
 dc.b 13,26 ; how cruel
 dc.b 27,27 ; I think that was a mistake
 dc.b 30,28 ; I think he saw you
 dc.b 47,29 ; you didn't really expect treasure?
 dc.b 0,0


;
;
;---------
 even
NPCINITIAL
list5
; first we have a dummy entry for npc 0
; this is used as some pointers to the *other*
; things which are used in this list
; (the equivalent of this area in list6 is used for temp workspace)
;
 dc.w floorpointers-npcinitial
 dc.w racetracks-npcinitial
 dc.w reversaltable-npcinitial
 dc.w 0 ; spare
;
; For greed agression, timidity, obediance, there
; is a special case - if one of the values is 255, then
; the npc will always choose that one, if it is possible
; This is particularly useful for slaves etc.
; Note that npcs will still respond to attacks etc. - 
; anything which sets the 'attention flag'

FRIENDLY EQU 0
dodge equ 0
damage equ 0
; now the npc tables themselves...
defaultmale equ 3410
defaultfemale equ 3420
defaultanimal equ 3400
; npc 0 has dummy entry used as pointers above

; dc.b enemy, dodge, attack, hit points, obedience, patience, gold-sing
; if bit 7 of the "enemy" byte is set, the npc will be inactive
; until it meets Lancelot
inactive equ $80
disabled equ $40 ; set for npc's in part 2

 dc.b FRIENDLY,dodge,35,100,3,0           ; 1 USER
 dc.w defaultmale ; standard singing

 dc.b inactive+disabled+friendly,dodge,10,100,255,1 ; 2 tristram
 dc.w 3700

 dc.b inactive+disabled+friendly,dodge,30,100,255,1 ; 3 galahad
 dc.w 3700
 dc.b inactive+disabled+friendly,dodge,30,100,255,1 ; 4 bors
 dc.w 3700
 dc.b inactive+disabled+friendly,dodge,30,100,255,1 ; 5 meliagaunt
 dc.w 3700
 dc.b inactive+disabled+friendly,dodge,30,100,255,1 ; 6 gawain
 dc.w 3700
 dc.b inactive+disabled+friendly,dodge,20,100,255,1 ; 7 red knight
 dc.w 3700
 dc.b inactive+disabled+friendly,dodge,2,10,255,1 ; 8 meliot
 dc.w 3990 ; groaned etc.
 dc.b inactive+disabled+friendly,dodge,30,100,255,1 ; 9 lamorak
 dc.w 3700

;---

floorpointers
; part of list5
; now 'floor pointers'
; there is one bye pair for each static room - the
; first byte gives the direction to go inwards
; and the second byte gives direction for going outwards
; (i.e. towards the synthesised grid)
;
; ** BIG WARNING **
; all shapes must be simply connected. i.e. given a pair of rooms,
; you must be able to trace a path between them using only the
; OUT paths of one OR the other.
; This is because of the way the follow and GO code works.
north equ 1
ne equ 2
east equ 3
se equ 5
south equ 4
sw equ 6
west equ 7
nw equ 8
up equ 9
down equ 10
verbin equ 11
out equ 12
cross equ 13
climb equ 14
jump equ 15

 dc.b 0 ; room 0 (not used)
 dc.b 0 ; room 1 (not used)
 dc.b 0 ; 2 - not used
 dc.b 0 ; 3 - hall
 dc.b down ; 4 - landing
 dc.b west ; 5 - billiard room
 dc.b south ; 6 - wc
 dc.b 5 ; 7 - drawing room
 dc.b east ; 8 - library

;---
 even
racetracks
; sequences of commands which actors obey
; each is referred to by a 16-bit offset from the start of list5
; the initial sequences are contained in this table at the start..
 dc.w 0 ; 0
 dc.w 0 ; 1 - user
 dc.w 0 ; WilliamRt-list5 ; 2 - William
 dc.w 0 ; JoanRt-list5 ; 3 - Joan
 dc.w AnthonyRt-list5 ; 4 - Anthony
 dc.w FionaRt-list5 ; 5 - Fiona
 dc.w 0 ; 6 - 
 dc.w 0 ; 7 - 
 dc.w 0 ; 8 -
 dc.w 0 ; 9
 dc.w 0 ; 10
 dc.w 0 ; 11
 dc.w 0 ; 12

StartRt
; each of the race track entries has a 4-byte entry:
; VERB PREP NOUN1 NOUN2
ipin equ 7
ipwith equ 16

drop equ 107
attack equ 40
open equ 114 ;64
go equ 96 ; go to room noun1 (=setupgo)
close equ 140 ; 90
wait equ 92
examine equ 100
take equ 105
give equ 111
eat equ 123
find equ 139
kill equ 93
waitforperson equ 89
waituntiltime equ 90
waitforperiod equ 91
put equ 108
returnobject equ 136
gdfind equ 139

Conditional equ 247

ActorVaryMessage equ 248 ; goes straight on in same turn to next step in rt
WRtActorVaryMessage equ ActorVaryMessage*256

ActorSingleMessage equ 249 ; this completes actor's turn. Like ActorM1Dot
WActorSingleMessage equ ActorSingleMessage*256

;; racetrackActorM1Dot equ 250
racetrackmessage equ 251
WRtMessage equ racetrackMessage*256

racetrackgosub equ 253
WRtGosub equ racetrackGosub*256

racetrackgoto equ 254
WRtGoto equ racetrackGoto*256

racetrackreturn equ 255
light equ 165 ; 115
ride equ  185 ; 135

stand equ 46
lie equ 47
drink equ 60
wear equ 106
remove equ 109

; nouns...
people equ 237
everything equ 234
nullobject equ 255

water equ 241 ; noun

; prepositions...
to equ 202
; note that:
;
; NOUN1 will always be searched for if not accessible
; to the verb (using the usual accessability rules)
;
; NOUN2 will normally be searched for using the same rules.
; There are situations where this is awkward - so if the
; preposition is WITH, then NOUN2 must be carried (or it will
; be searched for by the npc).
;
;---
WilliamRt
;;; dc.b go,0,6,$88 ; go to toilet
 dc.b go,0,5,$88 ; go to billiard room
 dc.b WaitForPeriod,0,5,nullobject
 dc.b go,0,3,$88 ; go to drawing room
;; dc.b WaitForPeriod,0,5,nullobject
 dc.b WaitFOrPerson,0,Fiona,nullobject
 dc.w WRtGoto,WilliamRt-list5
;---
AnthonyRt:
 dc.b take,0,WhitePlate,Nullobject
 dc.b WaitForPeriod,0,5,nullobject
 dc.b drop,0,WhitePlate,Nullobject
AnthonyRt1:
 dc.b go,0,7,$88 ; go to toilet
 dc.b WaitForPeriod,0,10,nullobject
; dc.b conditional,0,user,nullobject
;  dc.w WRTGoto,0,ART3-list5
; dc.b conditional,0,Joan,nullobject
;  dc.w WRTGoto,0,ART3-list5
; dc.b WaitForPeriod,0,2,nullobject
ART3
 dc.b go,0,3,$88 ; go to drawing room
 dc.b WaitForPeriod,0,10,nullobject
 dc.w WRtGoto,AnthonyRt1-list5
;----
;JoanRt
; dc.b go,0,5,$88
; dc.b WaitForPeriod,0,2,nullobject
; dc.b go,0,7,$88
; dc.b conditional,0,user,nullobject
;  dc.w WRTGoto,JRT3-list5
; dc.b conditional,0,Anthony,nullobject
;  dc.w WRTGoto,JRT3-list5
;
; dc.b WaitForPeriod,0,2,nullobject
;JRT3
; dc.w WRtGoto,JoanRt-list5
;---
FionaRt
 dc.b go,0,3,$88 ; go to hall
 dc.b WaitForPeriod,0,7,nullobject
 dc.b go,0,5,$88 ; go to eastern room
 dc.b WaitForPeriod,0,2,nullobject
; dc.w WaitForPerson,0,William,nullobject
 dc.w WRtGoto,FionaRt-list5
;---


;GuenBackToArthurRt
; dc.w WActorSingleMessage,2678 ; thanks L.
; dc.b go,0,151,nullobject ; back to castle
; dc.w WActorSingleMessage,2679 ; hi hubby!
; dc.b racetrackReturn,0,nullobject,nullobject
;;---
;RescuedKnightRt
;; dc.w WActorSingleMessage,2603 ; bowed low and promised further service
;RKRt
; dc.b go,0,154,nullobject
; dc.w WActorSingleMessage,2700 ; knelt at altar
; dc.w WActorSingleMessage,2701 ; prayed
; dc.b gdfind,0,merlin,nullobject
; dc.w WActorSingleMessage,2702 ; greeted Merlin
; dc.w WActorSingleMessage,2703 ; discussed Logris
; dc.b go,0,176,nullobject
; dc.w WActorSingleMessage,2704 ; lay down in grass
; dc.w WActorSingleMessage,2705 ; slept
; dc.w WActorSingleMessage,2706 ; slept
; dc.w WActorSingleMessage,2707 ; slept
; dc.w WRtGoto,RKRt-list5
;;---
;ArthurRt
; dc.b WaitForPerson,0,user,nullobject
; dc.w WActorSingleMessage,2490 ; greetings
; dc.w WActorSingleMessage,2491 ; greetings
; dc.w WActorSingleMessage,2492 ; knighted
; dc.w WActorSingleMessage,2493 ; goodbye
;; and continue saying goodbye until L goes
;ByeLLoop
;  dc.b Conditional,0,user,nullobject
;   dc.w WRtGoto,ByeL-list5
;; terminate Rt when L has gone.
; dc.b RacetrackReturn,0,nullobject,nullobject
;
;ByeL
; dc.w WActorSingleMessage,2494 ; goodbye
; dc.w WRtGoto,ByeLLoop-list5
;;---
;BreunisRt
; dc.b go,0,91,nullobject
;  dc.b conditional,0,user,nullobject
;   dc.w WRtGoto,BreunisAttackRt-list5
; dc.b go,0,90,nullobject
;  dc.b conditional,0,user,nullobject
;   dc.w WRtGoto,BreunisAttackRt-list5
; dc.b go,0,95,nullobject
;  dc.b conditional,0,user,nullobject
;   dc.w WRtGoto,BreunisAttackRt-list5
; dc.b go,0,94,nullobject
;  dc.b conditional,0,user,nullobject
;   dc.w WRtGoto,BreunisAttackRt-list5
; dc.b go,0,93,nullobject
;  dc.b conditional,0,user,nullobject
;   dc.w WRtGoto,BreunisAttackRt-list5
; dc.b go,0,97,nullobject
;  dc.b conditional,0,user,nullobject
;   dc.w WRtGoto,BreunisAttackRt-list5
; dc.w WRtGoto,BreunisRt-list5
;

;---
 even
reversaltable
; part of list5
; gives reverse directions for directions
; dc.b 0,4,6,7,1,8,2,3,5 ; compass directions
; dc.b 10,9,12,11,13,14,15
 dc.b 0,5,6,7,8,1,2,3,4 ; compass directions
 dc.b 10,9,12,11,13,14,15
;-----------

 even

;---------------
LIST4
; new stuff added for AA

; Menu text, etc.
; First, ptrs for all uses...
 dc.w MenuText-List4
 dc.w MenuData-list4
 dc.w HiresCoords-list4
 dc.w ExitOffsets-list4
 dc.w ObjectGraphics-list4
 dc.w IntroText-list4
 dc.w NounVerbTable-list4
 dc.w PCPallette-list4
 dc.w STPallette-list4
 dc.w CurveTable-list4 ;for Quick Draw Duel
 dc.w OpponentShape-list4

iNORTH equ 1
ivDOWN equ 10
ivUP equ 9
ivIN equ 11
iCROSS equ 13
iCLIMB equ 14
iJUMP equ 15
;
; Intransitive verbs..
iAGAIN equ 21
iLOOK equ 22
iINVENTORY equ 23
iQUIT equ 24
iRESTORE equ 25
iRAMSAVE equ 27
iRAMLOAD equ 28
iVERBOSE equ 30
iBRIEF equ 31
iNONE equ 32 ; description mode
iplay equ 33
ivON equ 34
ivOFF equ 35
iHELLO equ 205 ; >>fixed in g338
iOOPS equ 39
iATTACK equ 40
iSEARCH equ 42
iSMELL equ 44
iSIT equ 48
iSTAND equ 46
iSAY equ 50
;
iTELEPORT equ 51
iGETME equ 52
iSETupRUN equ 54
iSETupGO equ 58

iReportProblem equ 65

iSHOUT equ 73
ivTO equ 75
;
iHAVE equ 80 ; group of verbs for output..
iHAS equ 81
iAM equ 82
iARE equ 83
iIS equ 84
;
iGOin equ 87
iGOout equ 88
;
; goal-directed verbs
iWAITforPERSON equ 89
iWAITuntilTIME equ 90
iWAITforPERIOD equ 91
iWAIT equ 92 ; short wait
iPARSEwait equ 32 ; what the user gets when he types "wait"
iKILL equ 93
;
iDODGE equ 95
iGDgo equ 96 ; npcs use this
iGDrun equ 97
icheat equ 98
iBUY equ 99
;
; Transitive verbs..
iEXAMINE equ 100
iGET equ 104
iTAKE equ 105
iWEAR equ 106
iDROP equ 107
iPUT equ 108
iREMOVE equ 109
iTHROW equ 110
iGIVE equ 111
iASK equ 112
iTALK equ iASK * generic way of starting conversation
iFOLLOW equ 113
iOPEN equ 114
iEXTINGUISH equ 116
iPRESS equ 117
iDRESS equ 129
iCOLLECT equ 132
iRETURNobject equ 136 ; for npcs only
iSETUPfind equ 138
iGDfind equ 139
iCLOSE equ 140
iTELL equ 142 * redundant
iSTRUGGLE equ 144 * redundant
iSTEALallFROM equ 145 * redundant
iENTER equ 166 * redundant
;
; game specific..
iSCRATCH equ 170
iHIT equ 233 ;183
iCRUSH equ 186
iDEMOLISH equ 189
;
; Echo verbs also used for Y/N questions
ivNO equ 199 ;>>mike 26/8/88 - 200
ivYES equ 201
iWHY equ 213


NounVerbTable
; class of verbs possible for each object, in order of object
; Each object has four "class pointers" giving the number
; of the "verb table" to use for it, when it is in the following
; positions:
;  On Ground, Carried by user, worn by user, carried/worn by others
 dc.b 0,0,0,0 * none for object 0
 dc.b 24,0,0,0 * object 1 (user)
 dc.b 24,0,0,0 * object 2 (wiliam)
 dc.b 24,0,0,0 * object 3 (anthony)
 dc.b 24,0,0,0 * object 4 (joan)
 dc.b 24,0,0,0 * object 5 (fiona)
 dc.b 24,0,0,0 * object 6
 dc.b 24,0,0,0 * object 7
 dc.b 24,0,0,0 * object 8
 dc.b 24,0,0,0 * object 9
 dc.b 24,0,0,0 * object 10
 dc.b 24,0,0,0 * object 11
 dc.b 24,0,0,0 * object 12
 dc.b 24,0,0,0 * object 13
 dc.b 24,0,0,0 * object 14
 dc.b 24,0,0,0 * object 15
 dc.b 24,0,0,0 * object 16
 dc.b 24,0,0,0 * object 17
 dc.b 24,0,0,0 * object 18
 dc.b 24,0,0,0 * object 19
 dc.b 26,28,32,34 * object 20
 dc.b 26,28,32,34 * object 21
 dc.b 26,28,32,34 * object 22
 dc.b 26,28,32,34 * object 23
 dc.b 26,28,32,34 * object 24
 dc.b 26,28,32,34 * object 25
 dc.b 26,28,32,34 * object 26
 dc.b 26,28,32,34 * object 27
 dc.b 26,28,32,34 * object 28
 dc.b 26,28,32,34 * object 29
 dc.b 26,28,32,34 * object 30
 dc.b 26,28,32,34 * object 31
 dc.b 26,28,32,34 * object 32
 dc.b 26,28,32,34 * object 33
 dc.b 26,28,32,34 * object 34
 dc.b 26,28,32,34 * object 35
 dc.b 26,28,32,34 * object 334
 dc.b 26,28,32,34 * object 37
 dc.b 26,28,32,34 * object 38
 dc.b 26,28,32,34 * object 39
 dc.b 26,28,32,34 * object 40
 dc.b 26,28,32,34 * object 41
 dc.b 26,28,32,34 * object 42
 dc.b 26,28,32,34 * object 43
 dc.b 26,28,32,34 * object 44
 dc.b 26,28,32,34 * object 45
 dc.b 26,28,32,34 * object 434
 dc.b 26,28,32,34 * object 47
 dc.b 26,28,32,34 * object 48
 dc.b 26,28,32,34 * object 49
 dc.b 26,28,32,34 * object 50


;VerbTable
;; gives lists of verbs possible for objects, referenced
;; by NounVerbTable
; dc.b 0 * type 0
; dc.b iEXAMINE,iTALK,iATTACK,iSEARCH,0 * type 1 - for people
; dc.b iEXAMINE,iTAKE,0 * type 2 - for objects on ground
; dc.b iEXAMINE,iDROP,iTHROW,0 * type 3 - for objects held
; dc.b iEXAMINE,iDROP,iTHROW,iWEAR,0 * type 4 - for wearable objects held
; dc.b iEXAMINE,iRemove,0 * type 5 - for objects worn
; dc.b iEXAMINE,iTAKE,0 * type 6 - for objects held by others

MenuText
; pointers to actual text...
 dc.w M0-list4
 dc.w M1-list4
 dc.w M2-list4
 dc.w M3-list4
 dc.w M4-list4
 dc.w M5-list4
 dc.w M6-list4
 dc.w M7-list4
 dc.w M8-list4
 dc.w M9-list4
 dc.w M10-list4
 dc.w M11-list4
 dc.w M12-list4
 dc.w M13-list4
 dc.w M14-list4
 dc.w M15-list4
 dc.w M16-list4
 dc.w M17-list4
 dc.w M18-list4
 dc.w M19-list4
 dc.w M20-list4
 dc.w M21-list4
 dc.w M22-list4
 dc.w M23-list4
 dc.w M24-list4
 dc.w M25-list4
 dc.w M26-list4
 dc.w M27-list4
 dc.w M28-list4
 dc.w M29-list4
 dc.w M30-list4
 dc.w M31-list4
 dc.w M32-list4
 dc.w M33-list4
 dc.w M34-list4
 dc.w M35-list4
 dc.w M36-list4
 dc.w M37-list4
 dc.w M38-list4
 dc.w M39-list4
 dc.w M40-list4
 dc.w M41-list4
 dc.w M42-list4
 dc.w M43-list4
 dc.w M44-list4
 dc.w M45-list4
 dc.w M46-list4
 dc.w M47-list4
 dc.w M48-list4
 dc.w M49-list4
 dc.w M50-list4
 dc.w M51-list4
 dc.w M52-list4
 dc.w M53-list4
 dc.w M54-list4
 dc.w M55-list4
 dc.w M56-list4
 dc.w M57-list4
 dc.w M58-list4
 dc.w M59-list4
 dc.w M60-list4
 dc.w M61-list4
 dc.w M62-list4
 dc.w M63-list4
 dc.w M64-list4
 dc.w M65-list4
 dc.w M66-list4
 dc.w M67-list4
 dc.w M68-list4
 dc.w M69-list4
 dc.w M70-list4

; main menu text...
M0	 dc.b ' 0 ',0
M1       dc.b ' game     ',0
M2       dc.b ' UNDO     ',0
M3       dc.b ' RAM SAVE ',0
M4       dc.b ' RAM LOAD ',0
M5       dc.b ' SAVE     ',0
M6       dc.b ' LOAD     ',0
M7       dc.b ' Dummy    ',0
M8       dc.b ' QUIT     ',0
M9       dc.b ' TYPE SPD ',0
M10      dc.b ' TEXT SIZE',0
M11      dc.b ' MUSIC    ',0
M12      dc.b ' PAUSE    ',0
M13	 dc.b ' INVENTORY',0
M14	 dc.b ' THINGS   ',0
M15	 dc.b ' PEOPLE   ',0
M16	 dc.b ' SYSTEM   ',0
M17	 dc.b ' NULL     ',0
M18	 dc.b ' TAKE     ',0
M19	 dc.b ' DROP     ',0
M20	 dc.b ' EXAMINE  ',0
M21	 dc.b ' TALK     ',0
M22	 dc.b ' ATTACK   ',0
M23	 dc.b ' SEARCH   ',0
M24	 dc.b ' THROW    ',0
M25	 dc.b ' WEAR     ',0
M26	 dc.b ' REMOVE   ',0
M27	 dc.b ' FEATURES',0
M28	 dc.b ' NORMAL  ',0
M29	 dc.b ' FASTEST ',0
M30	 dc.b ' WALK    ',0
M31	 dc.b ' RUN     ',0
M32	 dc.b ' QUIT     ',0
M33
M34
M35
M36
M37
M38
M39
; 40 is the base for the objects
M40 	dc.b ' 40 ',0
M41	dc.b ' Sam     ',0
M42	dc.b ' William ',0
M43 	dc.b ' Joan    ',0
M44 	dc.b ' Anthony ',0
M45 	dc.b ' Fiona   ',0
M46 	dc.b ' 46 ',0
M47 	dc.b ' 47 ',0
M48 	dc.b ' 48 ',0
M49 	dc.b ' 49 ',0
M50 	dc.b ' 50 ',0
M51 	dc.b ' 51 ',0
M52 	dc.b ' 52 ',0
M53 	dc.b ' 53 ',0
M54 	dc.b ' 54 ',0
M55
M56
M57
M58
M59	 dc.b ' ',0
M60      dc.b ' plate    ',0
M61      dc.b ' plate    ',0
M62
M63
M64
M65
M66
M67
M68
M69
M70

 even

; data for menus
; format is:
; first byte: type of menu.
verbs equ 0
Things equ 32 * things on ground
peopleNearby equ 33
MenuInventory equ 48 * player's possessions
; or 128+menu to go to when this option is selected
; second byte: jump to jump table entry
; specified in second byte. 2=change current menu to specified one.
; third byte: type of menu
; fourth byte: message-100 to be printed when menu displayed

MenuData
 dc.w ImpossibleMenu-list4
 dc.w Menu2-List4,Menu4-List4,Menu6-List4
 dc.w Menu8-List4,Menu10-List4,Menu12-List4
 dc.w 0,0,0,0,0 * 14-22
 dc.w PeopleMenu-list4 * 24
 dc.w OnGroundMenu-list4 * 26
 dc.w HeldMenu-list4 * 28
 dc.w WearableMenu-list4
 dc.w WornMenu-list4
 dc.w HeldOthersMenu-list4

ImpossibleMenu
 dc.b verbs,0,0,17 ; NULL
 dc.b $ff,0,0,0

PeopleMenu
 dc.b verbs,0,0,15 * back to previous menu (8)
 dc.b verbs,0,0,20 ; iEXAMINE
 dc.b verbs,0,0,21 ; iTALK
 dc.b verbs,0,0,22 ;iATTACK
 dc.b verbs,0,0,23 ;iSEARCH,0 * type 1 - for people
 dc.b $ff,0,0,0

OnGroundMenu
 dc.b verbs,0,0,14 * back to THINGS menu (4)
 dc.b verbs,0,0,20 ;iEXAMINE
 dc.b verbs,0,0,18 ;iTAKE * type 2 - for objects on ground
 dc.b $ff,0,0,0

HeldMenu
 dc.b verbs,0,0,13 * back to previous menu
 dc.b verbs,0,0,20 ;iEXAMINE
 dc.b verbs,0,0,19 ;iDROP
 dc.b verbs,0,0,24 ;iTHROW * type 3 - for objects held
 dc.b $ff,0,0,0

WearableMenu
 dc.b verbs,0,0,13 * back to previous menu
 dc.b verbs,0,0,20 ;iEXAMINE
 dc.b verbs,0,0,19 ;iDROP
 dc.b verbs,0,0,24 ;iTHROW
 dc.b verbs,0,0,25 ;iWEAR * type 4 - for wearable objects held
 dc.b $ff,0,0,0

WornMenu
 dc.b verbs,0,0,13 * back to previous menu
 dc.b verbs,0,0,20 ;iEXAMINE
 dc.b verbs,0,0,26 ;iRemove * type 5 - for objects worn
 dc.b $ff,0,0,0

HeldOthersMenu
 dc.b verbs,0,0,15 * back to previous menu
 dc.b verbs,0,0,20 ;iEXAMINE
 dc.b verbs,0,0,18 ;iTAKE * type 6 - for objects held by others
 dc.b $ff,0,0,0

Menu2
; "SAVE" menu
 dc.b verbs,0,0,1 * game
 dc.b verbs,1,0,2 * UNDO
 dc.b verbs,2,0,3 * RAM SAVE
 dc.b verbs,3,0,4 * RAM LOAD
 dc.b verbs,4,0,5 * SAVE
 dc.b verbs,5,0,6 * LOAD
 dc.b verbs,6,0,8 * QUIT
 dc.b $FF * indicate end of table
 even

Menu4
; THINGS menu
 dc.b verbs,0,0,14 * things
 dc.b things,2,0,0 * game
 dc.b $FF * indicate end of table
 even

Menu6
; POSSESSIONS menu
 dc.b verbs,0,0,13 * inventory
 dc.b MenuInventory,2,0,0 * game
 dc.b $FF * indicate end of table
 even

Menu8
; PEOPLE menu
 dc.b verbs,0,0,15 * people
 dc.b peopleNearby,2,3,0 * game
 dc.b $FF * indicate end of table
 even

Menu10
; SYSTEM menu
 dc.b verbs,2,0,16 * game
 dc.b $0,0,0,8 * quit
 dc.b $0,0,0,9 * type speed
 dc.b $0,0,0,10 * text size
 dc.b $0,0,0,11 * music
 dc.b $0,0,0,12 * pause
 dc.b $FF * indicate end of table
 even

Menu12
; features menu
 dc.b verbs,2,0,27 * features
 dc.b verbs,2,0,28 * normal speed
 dc.b verbs,2,0,29 * fastest speed
 dc.b verbs,2,0,30 * walk
 dc.b verbs,2,0,31 * run

 dc.b $FF * indicate end of table
 even

;---------------

HiresCoords
* x,z,h, coords for each object.
* x,z,h, coords at which a person must stand to act on the object.
* ?,?
* all coordinates are in terms of cells
 dc.b 0,0,0,0,0,0,0,0               ; OBJECT 0
 dc.b 0,0,0,0,0,0,0,0          ;  1 - USER (detective)
 dc.b 0,0,0,0,0,0,0,0	; 2 - William
 dc.b 0,0,0,0,0,0,0,0	; 3 - Joan
 dc.b 0,0,0,0,0,0,0,0	; 4 - Anthony
 dc.b 0,0,0,0,0,0,0,0	; 5 - Fiona
 dc.b 0,0,0,0,0,0,0,0	; 
 dc.b 0,0,0,0,0,0,0,0	; 7
 dc.b 0,0,0,0,0,0,0,0	; 8
 dc.b 0,0,0,0,0,0,0,0	; 9
 dc.b 0,0,0,0,0,0,0,0	; 10
 dc.b 0,0,0,0,0,0,0,0	; 11
 dc.b 0,0,0,0,0,0,0,0	; 12
 dc.b 0,0,0,0,0,0,0,0	; 13
 dc.b 0,0,0,0,0,0,0,0	; 14
 dc.b 0,0,0,0,0,0,0,0	; 15
 dc.b 0,0,0,0,0,0,0,0	; 16
 dc.b 0,0,0,0,0,0,0,0	; 17
 dc.b 0,0,0,0,0,0,0,0	; 18
 dc.b 0,0,0,0,0,0,0,0	; 19
; objects (20..) are represented at present by 530+object num.
; so object 20 is shown as picture 550.
 dc.b 5,10,4,4,8,4,0,0	; 20
 dc.b 8,5,4,8,6,4,0,0	; 21
 dc.b 0,0,0,0,0,0,0,0	; 22
 dc.b 0,0,0,0,0,0,0,0	; 23
 dc.b 0,0,0,0,0,0,0,0	; 24
 dc.b 0,0,0,0,0,0,0,0	; 25
 dc.b 0,0,0,0,0,0,0,0	; 26
 dc.b 0,0,0,0,0,0,0,0	; 27
 dc.b 0,0,0,0,0,0,0,0	; 28
 dc.b 0,0,0,0,0,0,0,0	; 29
 dc.b 0,0,0,0,0,0,0,0	; 30
 dc.b 0,0,0,0,0,0,0,0	; 31
 dc.b 0,0,0,0,0,0,0,0	; 32
 dc.b 0,0,0,0,0,0,0,0	; 33
 dc.b 0,0,0,0,0,0,0,0	; 34
 dc.b 0,0,0,0,0,0,0,0	; 35
 dc.b 0,0,0,0,0,0,0,0	; 36
 dc.b 0,0,0,0,0,0,0,0	; 37




ExitOffsets
; hires offsets for exits which lead in each direction.

; relative x,z positions of place to start opening sequence...
; offset 0
 dc.w 0,0	; direction 0
 dc.w 24,16	; direction 1 ; going north
 dc.w 0,0	; direction 2
 dc.w 2,24	; direction 3 ; going east
 dc.w 0,0	; direction 4
 dc.w 16,16 ; 32,20	; direction 5 ; going south
 dc.w 0,0	; direction 6
 dc.w 44,16	; direction 7 ; going west

; relative positions of place to start entering from...
; offset 32
 dc.w 0,0	; direction 0
 dc.w 32,16	; direction 1 ; going north
 dc.w 0,0	; direction 2
 dc.w 48,16	; direction 3 ; going east
 dc.w 0,0	; direction 4
 dc.w 0,8	; direction 5
 dc.w 0,0	; direction 6
 dc.w -8,16	; direction 7 ; going west

; offsets from top left of door for door opening animation
; offset 64
 dc.w 0,0,1411,0	; direction 0
 dc.w -6,4,0,0	; direction 1 ; on north wall
 dc.w 0,0,1411,0	; direction 2
 dc.w 0,24,1411,0	; direction 3 ; on east wall
 dc.w 0,0,1411,0	; direction 4
 dc.w 0,16,0,0	; direction 5 ; on south wall
 dc.w 0,0,1411,0	; direction 6
 dc.w 8,24,1410,0	; direction 7 ; on west wall

; xmin,xsize,zmin,zsize in which to collision detect
; to trigger "go through door" sequence.
; offset 128
 dc.w 0,0,0,0		; direction 0
 dc.w 0,32,-32,48	; direction 1
 dc.w 0,0,0,0		; direction 2
 dc.w -16,32,0,48	; direction 3
 dc.w 0,0,0,0		; direction 4
 dc.w 0,32,0,48		; direction 5
 dc.w 0,0,0,0		; direction 6
 dc.w 32,32,0,48	; direction 7

ObjectGraphics
 dc.w 0,0
;; dc.w 1240,0 ; ani sequence to use, raster offset
 dc.w 1240,200	;  1 - USER (detective)
 dc.w 1240,0	; 2 - William
 dc.w 1240,100	; 3 - Joan
 dc.w 1240,0	; 4 - Anthony
 dc.w 1240,100	; 5 - Fiona
 dc.w 0,0

cr equ 13
IntroText
;      !                                       !   
 dc.b cr," ",cr
 dc.b "  When Robert Farleigh called together",cr
 dc.b "  his family for their annual reunion",cr
 dc.b "  at The Grange, trouble was expected.",cr
 dc.b "  Especially since he was still ",cr
 dc.b "  threatening to change his will... ",cr
 dc.b cr,"           ",12,cr
 dc.b "  This is a demonstration of the system",cr
 dc.b "  to be used to create Grange Murder.",cr
 dc.b 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 * delay
 dc.b "  Grange Murder is being produced by",cr,"         ",12,cr
 dc.b 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 * delay

 dc.b "       Graphics:       Erik Casey      ",cr
 dc.b "                       Dicon Peeke",cr
 dc.b "       Programming:    Mike Austin",cr
 dc.b "                       Nick Austin",cr
 dc.b "                       Mike Bryant",cr
 dc.b "                       Lauren Roberts",cr
 dc.b "       Design:         Pete Austin",cr
 dc.b "        Who together form LEVEL 9. "
 dc.b 0

STPallette
;Duel...
 dc.w $0000,$0567,$0723,$0034
 dc.w $0030,$0203,$0026,$0000
 dc.w $0200,$0004,$0320,$0030
 dc.w $0462,$0445,$0223,$0030

;battle in the clouds...
; dc.w $0056,$0473,$0337,$0666
; dc.w $0555,$0444,$0333,$0222
; dc.w $0046,$0056,$0760,$0311
; dc.w $0320,$0532,$0730,$0000

PCPallette
;Quick Draw Duel...
 dc.w $0000 ;r=0 g=0 b=0 rbgi=0
 dc.w $567F ;r=5 g=6 b=7 rbgi=15
 dc.w $7239 ;r=7 g=2 b=3 rbgi=9
 dc.w $0343 ;r=0 g=3 b=4 rbgi=3
 dc.w $0304 ;r=0 g=3 b=0 rbgi=4
 dc.w $2031 ;r=2 g=0 b=3 rbgi=1
 dc.w $0262 ;r=0 g=2 b=6 rbgi=2
 dc.w $0000 ;r=0 g=0 b=0 rbgi=0
 dc.w $2008 ;r=2 g=0 b=0 rbgi=8
 dc.w $0042 ;r=0 g=0 b=4 rbgi=2
 dc.w $320C ;r=3 g=2 b=0 rbgi=12
 dc.w $0305 ;r=0 g=3 b=0 rbgi=5
 dc.w $4624 ;r=4 g=6 b=2 rbgi=4
 dc.w $545E ;r=5 g=4 b=5 rbgi=14
 dc.w $2231 ;r=2 g=2 b=3 rbgi=1
 dc.w $0304 ;r=0 g=3 b=0 rbgi=4

;fist fight...
 dc.w 4096  ;r=1, g=0, b=0, rgbi=0  ;highlights on pictures, bottom row
 dc.w 17214 ;r=4, g=3, b=3, rgbi=14 ;highlight on grate logo, door logo, players trousers
 dc.w 13089 ;r=3, g=3, b=2, rgbi=1  ;crate logo, highlights on guard
 dc.w 12833 ;r=3, g=2, b=2, rgbi=1  ;guard, player trousers, door, door frame, picture frame
 dc.w 8726  ;r=2, g=2, b=1, rgbi=6  ;panels
 dc.w 4369  ;r=1, g=1, b=1, rgbi=1  ;panels, door latch/metal fuse box
 dc.w 4356  ;r=1, g=1, b=0, rgbi=4  ;panels
 dc.w 8200  ;r=2, g=0, b=0, rgbi=8  ;lamp dim-shadows, crate, door, floor pattern
 dc.w 21280 ;r=5, g=3, b=1, rgbi=12 ;part of fuse box
 dc.w 21292 ;r=5, g=3, b=2, rgbi=12 ;bulb, back of player hair
 dc.w 21033 ;r=5, g=2, b=2, rgbi=9  ;guard face, player arms
 dc.w 12552 ;r=3, g=1, b=0, rgbi=8  ;illuminated
 dc.w 16908 ;r=4, g=2, b=0, rgbi=12 ;highlights on case and lamp shade
 dc.w 8456  ;r=2, g=1, b=0, rgbi=8  ;illumated speckles
 dc.w 25662 ;r=6, g=4, b=3, rgbi=14 ;player hair, lamps, the odd pixel
 dc.w 0     ;r=0, g=0, b=0, rgbi=0  ;most of background, genuine black

;battle in the clouds...
 dc.w $0566 r=0 g=5 b=6 irgb=6
 dc.w $4735 r=4 g=7 b=3 irgb=5
 dc.w $3373 r=3 g=3 b=7 irgb=3
 dc.w $666E r=6 g=6 b=6 irgb=14
 
 dc.w $555E r=5 g=5 b=5 irgb=14
 dc.w $444E r=4 g=4 b=4 irgb=14
 dc.w $3331 r=3 g=3 b=3 irgb=1
 dc.w $2221 r=2 g=2 b=2 irgb=1
 
 dc.w $0466 r=0 g=4 b=6 irgb=6
 dc.w $0566 r=0 g=5 b=6 irgb=6
 dc.w $760C r=7 g=6 b=0 irgb=12
 dc.w $3111 r=3 g=1 b=1 irgb=1

 dc.w $3208 r=3 g=2 b=0 irgb=8
 dc.w $532C r=5 g=3 b=2 irgb=12
 dc.w $7309 r=7 g=3 b=0 irgb=9
 dc.w $0000 r=0 g=0 b=0 irgb=0

 dc.b 0,0 ;start of Curve table
CurveTable
 dc.b 170,168 ;x,y
 dc.b 153,167
 dc.b 139,164
 dc.b 126,159
 dc.b 117,153
 dc.b 102,140
 dc.b 96,132
 dc.b 91,125
 dc.b 87,117
 dc.b 84,111
 dc.b 81,102
 dc.b 79,92
 dc.b 78,86
 dc.b 77,79
 dc.b 76,73
 dc.b 75,68
 dc.b 74,63
 dc.b 73,58
 dc.b 72,53
 dc.b 0,0 ;end of curve table

OpponentShape ;left, top, right, bottom
 dc.b 8,3,23,11   ;head
 dc.b 11,11,20,16 ;neck
 dc.b 5,16,26,20  ;shoulder
 dc.b 2,20,29,26  ;chest
 dc.b 1,26,30,40  ;arms and hands
 dc.b 8,40,14,59  ;left leg
 dc.b 17,40,23,59 ;right leg
 dc.b 255

ENDTABLE
;---------
 END

